package com.whfc.ms.api.emp.service.impl;

import com.whfc.common.result.ListData;
import com.whfc.emp.dto.AppEmpBankDTO;
import com.whfc.emp.param.AppEmpBankAddParam;
import com.whfc.emp.param.AppEmpBankEditParam;
import com.whfc.emp.param.EnableBankParam;
import com.whfc.emp.service.AppEmpBankService;
import com.whfc.ms.api.emp.service.MsAppEmpBankService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClasssName MsAppEmpBankServiceImpl
 * @Description 人员银行账户
 * @Author hw
 * @Date 2020/12/31 9:35
 * @Version 1.0
 */
@Service
public class MsAppEmpBankServiceImpl implements MsAppEmpBankService {

    @DubboReference(interfaceClass = AppEmpBankService.class, version = "1.0.0")
    private AppEmpBankService appEmpBankService;

    @Override
    public ListData<AppEmpBankDTO> list(Integer empId) {
        List<AppEmpBankDTO> list = appEmpBankService.list(empId);
        return new ListData<>(list);
    }

    @Override
    public void add(AppEmpBankAddParam param) {
        appEmpBankService.add(param);
    }

    @Override
    public void edit(AppEmpBankEditParam param) {
        appEmpBankService.edit(param);
    }

    @Override
    public void enable(EnableBankParam param) {
        appEmpBankService.enable(param);
    }

    @Override
    public void del(Integer bankId) {
        appEmpBankService.del(bankId);
    }
}
